export const getRawMaterialOtherOption = (safe) => {
  return {
    labelPosition: 'right',
    labelWidth: 120,
    // menuBtn: true,
    submitBtn: false,
    submitText: '生成标签',
    emptyBtn: false,
    menuPosition: 'right',
    column: [
      {
        label: '工单号',
        prop: 'workOrderNo',
        span: 12,
        type: 'search',
        disabled: true,
        placeholder: '请选择工单号',
        rules: [
          {
            required: true,
            message: '请选择工单号',
            trigger: 'blur'
          }
        ],
        appendClick: () => {
          safe.openCommonModal('workerOrderNo');
        }
      },
      {
        label: '生产总数',
        prop: 'planQuantity',
        span: 12,
        disabled: true
      },
      {
        label: '产品编码',
        prop: 'partNo',
        span: 12,
        disabled: true
      },
      {
        label: '产品名称',
        prop: 'partName',
        span: 12,
        disabled: true
      },
      {
        label: '产品型号',
        prop: 'partModel',
        span: 12,
        disabled: true
      },
      {
        label: '序列号前缀',
        prop: 'prefix',
        rules: [
          {
            required: true,
            message: '请输入前缀字符',
            trigger: 'blur'
          }
        ]
      },
      {
        label: '起始流水号',
        prop: 'startSequenceNo',
        span: 12,
        rules: [
          {
            required: true,
            message: '请输入起始流水号',
            trigger: 'blur'
          },
          { validator: safe.customValidator, trigger: 'blur' }
        ]
      },
      {
        label: '序列号后缀',
        prop: 'suffix',
        span: 12
      },
      {
        label: '进制类型',
        prop: 'hexType',
        span: 12,
        // labelTip: '序列号生成流水的进制，十进制为10进1，十六进制为16进1；如进制类型为十进制，</br> 则进制字符为0123456789',
        type: 'select',
        value: '10',
        dicData: [
          {
            label: '十进制',
            value: '10'
          },
          {
            label: '十六进制',
            value: '16'
          },
          {
            label: '自定义',
            value: 'custom'
          }
        ],
        change: (val) => {
          if (val.value === '10') {
            safe.rawMaterialOtherForm.hexString = '0123456789';
          } else if (val.value === '16') {
            safe.rawMaterialOtherForm.hexString = '0123456789ABCDEF';
          } else {
            safe.rawMaterialOtherForm.hexString = '';
          }
        },
        rules: [
          {
            required: true,
            message: '请选择字符类型',
            trigger: 'blur'
          }
        ]
      },
      {
        label: '进制字符',
        prop: 'hexString',
        value: '0123456789',
        span: 12
      },
      {
        label: '增量',
        prop: 'incrementQty',
        type: 'number',
        precision: 0,
        span: 12,
        value: 1,
        rules: [
          {
            required: true,
            message: '请输入增量',
            trigger: 'blur'
          }
        ]
      },
      {
        label: '生产数量',
        prop: 'quantity',
        type: 'number',
        precision: 0,
        placeholder: '请输入生产数量',
        rules: [
          {
            required: true,
            message: '请输入生产数量',
            trigger: 'blur'
          }
        ],
        span: 12
      },
      {
        label: '备注',
        prop: 'remark',
        type: 'textarea',
        minRows: 3,
        maxRows: 3,
        span: 12
      }
    ]
  };
};
